const user = require('../controllers/user')
const { apiPreFix } = require('../config').server
module.exports = (router) => {
  /**
   * 获取用户信息
   */
  router.get(`${apiPreFix}/user/getUserInfo`, async  ctx => {
    await user.getUserInfo(ctx)
  })
  /**
   * 更新用户信息
   */
  router.post(`${apiPreFix}/user/update`, async  ctx => {
    await user.update(ctx)
  })
  // 获取用户列表
  router.get(`${apiPreFix}/user/list`, async ctx => {
    await user.getUserList(ctx)
  })
}